<template>
	<view class="main">
		<view class="infos">
			<view class="title">{{info.title}}</view>
				<view class="tabs flex align between">
					<view>发布时间：{{info.create_time}}</view>
					<view>{{info.pv}}人阅读</view>
				</view>
		</view>
		<view class="content">
			<rich-text :nodes="info.content"></rich-text>
		</view>
		
	</view>
</template>

<script>
	import {
		articleDetail
	} from '@/api/apiData.js';
	export default {
		data() {
			return {
                  info:'',
				  id:''
			};
		},
		onLoad(option) {
			this.id = option.id
		},
		onShow() {
			this.getInfo()
		},
		methods:{
			async getInfo(){
				const result = await articleDetail({
					article_id:this.id
				})
				this.info = result.data
			}
		}
		
	}
</script>

<style lang="less">
	.main {
		.infos{
			padding: 34rpx 40rpx 20rpx;
			border-bottom: dotted 4rpx #CCCCCC;
			.title{
				font-size: 32rpx;
				font-weight: bold;
			}
			.tabs{
				font-size: 26rpx;
				color: #999999;
				margin: 20rpx 0;
			}
		}
		.content{
			padding: 30rpx 40rpx 20rpx;
		}
	}
</style>